<template>
  <div class="child">
    <h2>我是Child组件</h2>
<h3>求和为{{ sum }}</h3>
  </div>
</template>

<script setup>
import {ref} from 'vue'
import axios from 'axios'
let sum = ref(0)
// 异步任务
let result = await axios.get('https://api.uomg.com/api/rand.qinghua?format=json')
console.log(result.data);

</script>

<style lang="scss" scoped>
  .child {
    background-color: skyblue;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 10px;
  }
</style>